#include <stdio.h>
float power(float, int);
int main()
{
    int N, n;
    float base;
    scanf("%d", &N);
    while(N--){
        scanf("%f %d", &base, &n);
        printf("%.2f\n", power(base, n));
    }
    return 0;
}
float power(float base, int n){
    float temp = base;
    while(--n){
        base *= temp;
    }
    return base;
}